package com.th.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.th.Service.SupplierService;
import com.th.pojo.Goods;
import com.th.pojo.Supplier;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping("/authc")
public class SupplierController {
    @Autowired
    SupplierService supplierService;

    @RequestMapping("/supplierlist")
    public String supplierlist(Model model,@RequestParam(value = "pagenum", defaultValue = "1") String pageNum) {
            //查询全部
            IPage<Supplier> page = supplierService.page(new Page<>(Integer.parseInt(pageNum), 10));
            model.addAttribute("page", page);
            return "authc/supplier";
        }
}
